<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

    <div class="info"></div>
    <script>
        // ES6新特性  ，模板字符串
        var userInfo = {
                uname: 'zhangsan',
                age: 13,
                gender: 'female'
            }
            // var userTage = '<ul><li>' + userInfo.uname + '</li><li>' + userInfo.age + '</li><li>' + userInfo.gender + '</li></ul>';
        var userTage = `<ul>
                        <li>${userInfo.uname}</li>
                        <li>${userInfo.age}</li>
                        <li>${userInfo.gender}</li>
                        </ul>`;
        var div = document.querySelector('.info');
        div.innerHTML = userTage;
    </script>
</body>

</html>